<div class="keep-accounts-Edit">
  <div *ngIf="!loading">
    <!-- time -->
    <div nz-row [nzGutter]="8" class="edit-panel">
      <div nz-col [nzSpan]="3" [nzOffset]="2" class="edit-panel__label">
        Date :
      </div>  
      <div nz-col [nzSpan]="8">
        <nz-datepicker [(ngModel)]="event.date" [nzPlaceHolder]="'Select date'" [nzShowTime]="true" [nzFormat]="'YYYY/MM/DD'"></nz-datepicker>
      </div>
    </div>
    <!-- why -->
    <div nz-row [nzGutter]="8" class="edit-panel">
      <div nz-col [nzSpan]="3" [nzOffset]="2" class="edit-panel__label">
        Why :
      </div>
      <div nz-col [nzSpan]="6" >
        <!-- class -->
        <nz-select style="width: 80px;"
                  (ngModelChange)="classChange($event)"
                  [(ngModel)]="whyClass" nzAllowClear>
          <nz-option
            *ngFor="let cls of whyClassArray"
            [nzLabel]="cls.name"
            [nzValue]="cls"
            [nzDisabled]="cls.disabled">
          </nz-option>
        </nz-select>
      </div>
      <div nz-col [nzSpan]="6">
        <!-- detail -->
        <nz-input [(ngModel)]="event.content" name="why" [nzPlaceHolder]="'Why ?'"></nz-input>
      </div>
      <div nz-col [nzSpan]="3" [nzOffset]="1" *ngIf="event.date && event.class && event.content && event.price">
        <button nz-button [nzType]="'primary'" (click)="saveEvent()">
          Save ~
        </button>
      </div>
    </div>
    <!-- Price -->
    <div nz-row [nzGutter]="8" class="edit-panel">
      <div nz-col [nzSpan]="3" [nzOffset]="2" class="edit-panel__label" style="font-size: 1.2rem;">
        <i class="anticon anticon-pay-circle-o"></i>
      </div>
      <div nz-col [nzSpan]="8">
          <nz-input-number [(ngModel)]="event.price" [nzMin]="0" name="price" [nzStep]="1"></nz-input-number>
      </div>
    </div>
  </div>
  <!-- loading -->
  <nz-spin *ngIf="loading" [nzTip]="'正在写入数据...'">
      <nz-alert [nzType]="'info'"
                [nzMessage]="'稍等片刻～'" 
                [nzDescription]="'配儿子写作业到五年级，然后心梗住院了，做了两个支架。想来想去命更重要，作业什么的就随其自然吧。'">
      </nz-alert>
    </nz-spin>
</div>